package cn.com.huzo.model.entities.trade;

import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Date;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 生产指示书明细-根据发货目的地分配产品实体类
 *
 * @author 吴旭
 */
public class ProductionInstructionLinesDestinationSchemaEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 2353660717777980987L;
    private String LinesId;
    private Long HeaderId;                    // 所属生产指示书ID
    private String ParentLinesId;             // 所属明细标识
    private String Destination;               // 目的地
    private Date DeliveryDate;                // 交付日期
    private Integer Quantity;                 // 交付数量

    public String getLinesId() {
        return LinesId;
    }

    public void setLinesId(String LinesId) {
        this.LinesId = LinesId;
    }

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public String getParentLinesId() {
        return ParentLinesId;
    }

    public void setParentLinesId(String ParentLinesId) {
        this.ParentLinesId = ParentLinesId;
    }

    public String getDestination() {
        return Destination;
    }

    public void setDestination(String Destination) {
        this.Destination = Destination;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Date getDeliveryDate() {
        return DeliveryDate;
    }

    public void setDeliveryDate(Date DeliveryDate) {
        this.DeliveryDate = DeliveryDate;
    }

    public Integer getQuantity() {
        return Quantity;
    }

    public void setQuantity(Integer Quantity) {
        this.Quantity = Quantity;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof ProductionInstructionLinesDestinationSchemaEntity)) {
            return false;
        }

        final ProductionInstructionLinesDestinationSchemaEntity that = (ProductionInstructionLinesDestinationSchemaEntity) o;

        return new EqualsBuilder()
                .append(this.getLinesId(), that.getLinesId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getLinesId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
